Google Coding Interview Question - Find The Winner Of The Circular Game - Javascript